package homework;

public class Hk3 {
	public static void main(String[] args) {
		String strings[]={"string","starting","strong","street", "stir","studeng","soft","sting"};
		int startcount=0;
		int endcount=0;
		for (int i = 0; i < strings.length; i++) {
			if(strings[i].startsWith("st"))
				startcount++;
			if(strings[i].endsWith("ng"))
				endcount++;
		}
		System.out.println("start with 'st':"+startcount+"  end with 'ng':"+endcount);
	}

}
